import { _decorator, Component, Node, randomRange, tween, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Fish')
export class Fish extends Component {

    @property
    mul = 1;

    start() {
        tween(this.node)
            .by(randomRange(1, 5), { position: v3(0, -50 * this.mul) })
            .delay(randomRange(1, 3))
            .by(randomRange(1, 5), { position: v3(0, 50 * this.mul) })
            .delay(randomRange(1, 3))
            .union().repeatForever().start();
    }

    update(deltaTime: number) {

    }
}


